home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 426-450 / disk_439 / curses / src / acurses.h next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  93 lines

  1. #include <intuition/intuition.h>
  2. #include <intuition/screens.h>
  3.   
  4. #undef TRUE
  5. #undef FALSE
  6. #include "curses.h"
  7.   
  8. /*
  9.  *
  10.  * Module      : acurses.h
  11.  *
  12.  * Description : Header file for AMIGA CURSES package.
  13.  *
  14.  * Author      : Simon Raybould  (sie@fulcrum.bt.co.uk)
  15.  *
  16.  * Date        : 16th February 1990
  17.  *
  18.  */
  19.   
  20.   
  21. #define MAXTEXTLEN    80    /* Max text to an output call */
  22. #define SOUNDLENGTH    2    /* Number of bytes in the sound wave */
  23. #define CAPSMASK    0x07    /* leftshift | rightshift | capslock */
  24. #define SHIFTMASK    0x03    /* leftshift | rightshift */
  25.   
  26. /*
  27.  *    Characters
  28.  */
  29.   
  30. #define BS            0x08    /* Backspace */
  31. #define CR            0x0d    /* Carriage return */
  32.   
  33. /*
  34.  *    My Flags. These are global to all windows, not window specific.
  35.  */
  36.  
  37. #define CFLAG_CURSOR    (1<<0)    /* T=Cursor on, F=Cursor off. */
  38. #define CFLAG_CBREAK    (1<<1)    /* T=cbreak mode, F=nocbreak mode */
  39. #define CFLAG_NLCR    (1<<2)    /* T=nl to cr mapping, F=no mapping */
  40. #define    CFLAG_ECHO    (1<<3)    /* T=Echo enabled, F=no echo */
  41. #define    CFLAG_INITSCR    (1<<4)    /* T=initscr has been called */
  42.  
  43. /*
  44.  *    WINDOW flags, these are specific to each window.
  45.  */
  46.  
  47. #define CWF_MOVED    (1<<0)    /* move() has been done on this window */
  48.  
  49. /*
  50.  *    Buffer size for raw key events.
  51.  */
  52. #define RAWBUFSIZ    32
  53.  
  54. /*
  55.  *    Scroll directions
  56.  */
  57. #define SCROLL_UP    1
  58. #define SCROLL_DOWN    2
  59.  
  60. /*
  61.  *    Internal structures.
  62.  */
  63.  
  64. struct LineElement {
  65.   unsigned char Touched;    /* This line needs refreshing */
  66.   char *Line;    /* Actual text */
  67.   char *LRLine;    /* text when last refreshed */
  68.   short *ATTRS;    /* Attributes */
  69.   short *LRATTRS;    /* Attributes when last refreshed */
  70.   unsigned char StartCol;
  71.   unsigned char EndCol;
  72. };
  73.  
  74. struct WindowState {
  75.   WINDOW *ParentWin;
  76.   WINDOW Window;
  77.   short ScrollTop;
  78.   short ScrollBot;
  79.   struct WindowState *Prev;
  80.   struct WindowState *Next;
  81.   struct LineElement *LnArry;
  82.   unsigned char NLines;
  83. };
  84.  
  85. /*
  86.  *    Simple implementation of wnoutrefresh() and doupdate()
  87.  */
  88.  
  89. struct RefreshElement {
  90.   WINDOW *WinPtr;
  91.   struct RefreshElement *Next;
  92. };
  93.